package com.t235.gc.goods.service;

import com.t235.gc.entity.GoodsCategory;
import com.t235.gc.mapper.GoodsCategoryMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsCategoryService {
    @Autowired
    GoodsCategoryMapper goodsCategoryMapper;
    public List<GoodsCategory> FindByAll(GoodsCategory goodsCategory){
        //查询所有分类
        return goodsCategoryMapper.FindByAll(goodsCategory);
    }
    public int insertSelective(GoodsCategory goodsCategory){
        //添加分类
        return goodsCategoryMapper.insertSelective(goodsCategory);
    }
    public int updateByPrimaryKeySelective(GoodsCategory goodsCategory){
        //修改分类
        return goodsCategoryMapper.updateByPrimaryKeySelective(goodsCategory);
    }
    public int deleteByPrimaryKey(Long goodsCategoryId){
        //删除分类
        return goodsCategoryMapper.deleteByPrimaryKey(goodsCategoryId);
    }
}
